package rjeutsky.ui;

import java.io.InputStream;

public abstract class ConsoleRequest<T> {
	protected T value;
	
	protected String requestText;
	
	protected InputStream input = System.in;
	
	public void Run() {
		showRequest();
		queryConsole();
	}
	
	protected void showRequest(){
		System.out.println(requestText);
	}
	
	protected abstract void queryConsole();
	
	public String getRequestText() {
		return requestText;
	}

	public void setRequestText(String requestText) {
		this.requestText = requestText;
	}

	public T getValue() {
		return value;
	}
}
